VERSION 1.0 CLASS
BEGIN
  MultiUse = -1  'True
  Persistable = 0  'NotPersistable
  DataBindingBehavior = 0  'vbNone
  DataSourceBehavior  = 0  'vbNone
  MTSTransactionMode  = 0  'NotAnMTSObject
END
Attribute VB_Name = "TestMethodTimer"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = True
Option Explicit

Private mTimer As MethodTimer
Private mLogger As Logger

Public Sub testCallOrdering()
givenMethodTimer
whenCalled
thenForwardPrecedesTimeReport
End Sub


''
''
Private Sub givenMethodTimer()
Set mTimer = New MethodTimer
mTimer.init Me, Me
End Sub

Private Sub whenCalled()
mTimer.forward
End Sub
Private Sub thenForwardPrecedesTimeReport()
assert.equals mLogger.Count, 3
assert.equals mLogger.First, "forward", "forward called first"
assert.equals mLogger.Second, "ReportTime", "ReportTime called second"
assert.equals TypeName(mLogger.Third), "Double", "Logged Time as double"
End Sub



Public Sub forward()
mLogger.Log "forward"
End Sub
Public Sub reportTime(elapsedTime As Double)
mLogger.Log "ReportTime"
mLogger.Log elapsedTime
End Sub

'OPTIONAL METHODS
Public Sub setup()
Set mLogger = New Logger
End Sub

Public Function NumOfAsserts() As Long
NumOfAsserts = 4
End Function

